// 1.导入fs模块
const fs = require('fs');
//创建写入流对象
const ws = fs.createWriteStream('./fs-writeFile/文件写入/file4.txt');
ws.write('半亩方糖一件开\r\n')
ws.write('天光运城共徘徊\r\n')
ws.write('文君那得清如许\r\n')
ws.write('为有源头活水来\r\n')

//关闭通道(也会自己关闭 可写可不写)
ws.close();